<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>RobotClient: TextLog.cpp源文件</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">RobotClient
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- 制作者 Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="namespaces.html"><span>命名空间</span></a></li>
      <li><a href="annotated.html"><span>类</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>文件成员</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_text_log_8cpp.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">TextLog.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_text_log_8cpp.html">浏览该文件的文档。</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include &quot;<a class="code" href="_text_log_8h.html">TextLog.h</a>&quot;</span>
<a name="l00002"></a>00002 
<a name="l00003"></a><a class="code" href="class_text_log.html#a980c73330583c4b0c7dc04cbbb9c62f2">00003</a> <a class="code" href="class_text_log.html#a980c73330583c4b0c7dc04cbbb9c62f2" title="构造函数">TextLog::TextLog</a>(wxWindow* parent, wxWindowID <span class="keywordtype">id</span>,<span class="keyword">const</span> wxString value,
<a name="l00004"></a>00004         <span class="keyword">const</span> wxPoint&amp; pos, <span class="keyword">const</span> wxSize&amp; size,
<a name="l00005"></a>00005         <span class="keywordtype">long</span> style, <span class="keyword">const</span> wxValidator&amp; validator,
<a name="l00006"></a>00006         <span class="keyword">const</span> wxString&amp; name):wxTextCtrl(parent,id,value,pos,size,style,validator,name)
<a name="l00007"></a>00007 {
<a name="l00008"></a>00008 
<a name="l00009"></a>00009 };
<a name="l00010"></a>00010 
<a name="l00011"></a><a class="code" href="class_text_log.html#aef33ef35e4d7dbf90d859c5ef5c529a4">00011</a> <span class="keywordtype">void</span> <a class="code" href="class_text_log.html#aef33ef35e4d7dbf90d859c5ef5c529a4" title="添加聊天记录">TextLog::AddLog</a>(<span class="keyword">const</span> wxString name,<span class="keyword">const</span> wxString msg)
<a name="l00012"></a>00012 {
<a name="l00013"></a>00013     AppendText(_(<span class="stringliteral">&quot;\&quot;&quot;</span>)+name+_(<span class="stringliteral">&quot;\&quot;  &quot;</span>)+wxDateTime::Now().Format()+_(<span class="stringliteral">&quot;\n&quot;</span>));
<a name="l00014"></a>00014     AppendText(_(<span class="stringliteral">&quot;  &quot;</span>)+msg+_(<span class="stringliteral">&quot; \n\n&quot;</span>));
<a name="l00015"></a>00015     <a class="code" href="class_text_log.html#af6167912e7156f94e928f6c468e5a165">log</a>[name].push_back(msg);
<a name="l00016"></a>00016 }
<a name="l00017"></a><a class="code" href="class_text_log.html#a78055a86dae63b076fc7372a1a5c7b08">00017</a> wxString <a class="code" href="class_text_log.html#a78055a86dae63b076fc7372a1a5c7b08" title="获取name说的最后一句话">TextLog::LastMsg</a>(wxString name)
<a name="l00018"></a>00018 {
<a name="l00019"></a>00019     <span class="keywordflow">return</span> <a class="code" href="class_text_log.html#af6167912e7156f94e928f6c468e5a165">log</a>[name].back();
<a name="l00020"></a>00020 }
</pre></div></div><!-- contents -->
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>类</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>命名空间</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>枚举</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>枚举值</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="_text_log_8cpp.html">TextLog.cpp</a>      </li>

    <li class="footer">Generated at 2012年一月9日 星期一 09:15:28 for RobotClient by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
